﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Ejemplo;
using System.Text;

namespace WebArchivosTelefonica.Jerarquias
{
	/// <summary>
	/// 
	/// </summary>
	public partial class WebForm2 : System.Web.UI.Page
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		protected void Page_Load(object sender, EventArgs e)
		{
			//FileSystemDataSource dataSource= new FileSystemDataSource();

			//dataSource.BaseDirectory = Server.MapPath("test2");

			//TreeView1.DataSource = dataSource;

			//TreeView1.DataBind();


			MembershipUserCollection usuarios = Membership.GetAllUsers();
			StringBuilder stringListado = new StringBuilder();
			foreach (MembershipUser usuario in usuarios)
			{
				string linea = usuario.UserName + " ";
				linea += usuario.Email + " ";

				foreach (string rol in Roles.GetRolesForUser(usuario.UserName))
				{
					linea += " " + rol;

				}

				linea += "</br>";
				stringListado.AppendLine(linea);
			}

			Literal1.Text = stringListado.ToString();
			

		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
		{
			
		}
	}
}
